package com.ssy.lingxi.member.merchant.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 会员登录历史记录表
 * @author 万宁
 * @version 2.0.0
 * @date 2020-11-25
 */
@Entity
@Table(schema = "public", name = "ms_mc_member_login_history", indexes = {@Index(name="ms_mc_member_login_history_member_id_idx", columnList = "memberId"),@Index(name="ms_mc_member_login_history_role_id_idx", columnList = "roleId"), @Index(name="ms_mc_member_login_history_login_time_idx", columnList = "loginTime")})
public class MemberLoginHistoryDO implements Serializable {
    private static final long serialVersionUID = 3433654636799802249L;

    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="member_login_history_seq")
    @SequenceGenerator(sequenceName="ms_mc_member_login_history_seq", name="member_login_history_seq",allocationSize = 1)
    private Long id;

    /**
     * 登录时间
     */
    @Column(columnDefinition = "timestamp")
    private LocalDateTime loginTime;

    /**
     * 会员Id
     */
    @Column
    private Long memberId;

    /**
     * 会员角色Id
     */
    @Column
    private Long roleId;

    /**
     * 登录来源
     */
    @Column
    private Integer loginSource;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public LocalDateTime getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(LocalDateTime loginTime) {
        this.loginTime = loginTime;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Integer getLoginSource() {
        return loginSource;
    }

    public void setLoginSource(Integer loginSource) {
        this.loginSource = loginSource;
    }
}
